package com.ydkj.a37e_mall.Classes.Model.Request;

import android.util.Log;

import com.ydkj.a37e_mall.Resource.Utils.Rsa;

/**
 * Created by Administrator on 2017/2/27.
 */

public class ExchangeTbReq {
    private String amount;
    private String type;
    private String intent;
    private String secret;

    public String getAmount() {
        return amount;
    }

    public void setAmount(String amount) {
        this.amount = amount;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getIntent() {
        return intent;
    }

    public void setIntent(String intent) {
        this.intent = intent;
    }

    public String urlString() {
        return "treasure/exchange/";
    }

    public String getSecret() {

        String string = "amount=" + amount + "&type=" + type + "&intent=" + intent;
        try {
            Rsa rsa = new Rsa();
            secret = rsa.encryptByPublic(string);
        } catch (Exception e) {
            e.printStackTrace();
        }
        Log.e("ssss", "update_message_source===>" + string);
        return secret;
    }
}

